let api_url='http://localhost:3000/'
let suo = "已上锁"
let token = require("jsonwebtoken")
let secret="加密锁"
// 加密token
function getToken(data){
    return token.sign(data,secret,{expiresIn:24*3600})
}

// 解密token
function verifyToken(t){
    try {
        return token.verify(t,secret)
    } catch (error) {
        return error
    }
}

module.exports={
    getToken,verifyToken,api_url,suo
}
